home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lantools / bkup / b_proces.bat < prev    next >
DOS Batch File  |  1990-08-23  |  3KB  |  73 lines

  1. :... B_PROCES.BAT, Craig MacPherson
  2. :    This batch file processes backup requestes from users. It is called 
  3. :    from the users backup job batch file. This file is processed on the 
  4. :    backup server.
  5. :
  6. :    Variables passed 
  7. :      - %1 Userid
  8. :      - %2 Drive
  9. :      - %3 ALL or MOD file backup indicator 
  10.  
  11.  
  12. :... Del the que file to indicate processing has started
  13.      del %D2%\backups\backup.jbs\%1.que
  14.  
  15. :... Load Map Assist and connect to users workstation, remote drive o:
  16.      MA o:=Trilan1/%1
  17.      if errorlevel 1 goto NO_CONNECT
  18.  
  19. :... Clean out skipped and corrupt file logs
  20.      call %D1%b_skip.bat DELETE
  21.  
  22. :... Which backup to run Mod or Full
  23.      :ALL
  24.       set STATUS=GOOD
  25.       if not %3.==ALL. goto MODIFIED_FILES_ONLY
  26.       tbackup o:\/s/la:"%1 Complete backup - Drive %2"/a/li:"files.tmp":a
  27.       if errorlevel set STATUS=BAD
  28.       goto UPDATE_LOGS
  29.  
  30.      :MODIFIED_FILES_ONLY
  31.       tbackup o:\/s/m/la:"%1 Modified files only Drive - %2"/a/li:"files.tmp":a
  32.       if errorlevel set STATUS=BAD
  33.      
  34. :UPDATE_LOGS
  35.      :USERS DETAILED LOG
  36.      :... Add current tape volume to users detailed history log
  37.           copy %D2%\backups\activity.lgs\%1.his+%D2%\backups\cur_tape.vol %D2%\backups\activity.lgs\%1.his
  38.  
  39.      :... Add Maynard tape program output to users detailed history log
  40.           if not exist %D2%\backups\backup.jbs\files.tmp set STATUS=BAD
  41.           if not exist %D2%\backups\backup.jbs\files.tmp echo "                              Backup Failed">>%D2%\backups\activity.lgs\%1.his 
  42.           copy %D2%\backups\activity.lgs\%1.his+%D2%\backups\backup.jbs\files.tmp %D2%\backups\activity.lgs\%1.his
  43.           if exist %D2%\backups\backup.jbs\files.tmp del %D2%\backups\backup.jbs\files.tmp>>nul:
  44.  
  45.      :... Check for skipped or corrupt files, add info to users detailed history log
  46.           call %D1%b_skip.bat %1
  47.           goto MARK_EOJ
  48.  
  49.      :NO_CONNECT
  50.      :... Mark users history log with no connect message
  51.           copy %D2%\backups\activity.lgs\%1.his+%D2%\backups\no_con.asc %D2%\backups\activity.lgs\%1.his
  52.           set STATUS=NO_CON
  53.  
  54.      :MARK_EOJ
  55.      :... Mark EOJ in users history file
  56.           call %D1%b_eoj.bat %1
  57.  
  58.      :... Strip Form Feeds from users history file
  59.           call %D1%b_strip.bat %1
  60.  
  61.      :SYSTEM AND USER SUMMARY LOGS
  62.      :... Add user info and status to system activity log and user summary log
  63.           call %D1%b_activ.bat BACKUP %STATUS% %1 %2 %3
  64.  
  65.  
  66. :... Unload Mapassist 
  67.      MA -
  68.  
  69. :... Send user a message
  70.      send "Backup of Drive %2 Completed" %1
  71.  
  72. :END
  73.